11. 在 Python 中计算曲线下方面积[参考答案]
在 Python 中计算曲线下方面积[参考答案]
from scipy.stats import norm
def gaussian_probability(mean, stdev, x_low, x_high):
return norm(loc = mean, scale = stdev).cdf(x_high) - norm(loc = mean, scale = stdev).cdf(x_low)
from scipy.stats import norm
def gaussian_probability(mean, stdev, x_low, x_high):
return norm(loc = mean, scale = stdev).cdf(x_high) - norm(loc = mean, scale = stdev).cdf(x_low)